Repository navigation
Core: Add a filesystem-only HadoopCatalog - #4450
Open
Anurag-S1ngh wants to merge 2 commits into
Open
Anurag-S1ngh wants to merge 2 commits into
Anurag-S1ngh wants to merge 2 commits into
Conversation
Store tables under warehouse/<namespace>/<table> with metadata in
v{n}.metadata.json and a version-hint.text, matching the Java
HadoopCatalog. Read the latest metadata by following the hint and falling
back to listing the metadata directory, so tables named with the uuid
metadata convention can be opened too.
Namespaces map to directories and carry no properties. Renames, views,
registration, and namespace properties are not supported, the same as the
Java catalog.
Rename the metadata writer so it does not override the base helper with a different signature, match the register_table signature, and cast the format version for the schema conversion.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Add
pyiceberg.catalog.hadoop.HadoopCatalog, a filesystem-only catalog with the same layout as the Java HadoopCatalog: tables live under<warehouse>/<namespace>/<table>, metadata is written asv{n}.metadata.json, andversion-hint.textpoints at the current version. When the hint is missing or stale, the latest metadata file is found by listing the metadata directory, which also opens tables named with the00000-<uuid>.metadata.jsonconvention used by the REST and SQL catalogs.Namespaces map to directories and have no stored properties, matching Java. Rename, registration, views, and namespace property updates are not supported.
New catalog type:
type=hadoopwith awarehouseproperty.Are these changes tested?
Yes.
tests/catalog/test_hadoop.pycovers create, load, append, commit, version-hint updates, uuid-named metadata without a hint, stale hints, nested namespaces, listing, drop rules, custom locations, and unsupported operations.tests/catalog/test_base.pypasses.Are there any user-facing changes?
Yes. A new
HadoopCatalogand thehadoopcatalog type are available.